<template>
  <div class="news">
    <!-- 导航区 -->
    <ul>
      <!-- <li><RouterLink to="/news/1">新闻1</RouterLink></li> -->
      <!-- 字符串传参 -->
      <!-- <li><router-link to="/news/1?id=1&title=新闻1&content=asdfasdf">新闻1</router-link></li> -->
      <!-- 对象传参 -->
      <!-- <RouterLink
        :to="{
          path: '/news/1',
          query: {
            id: '1',
            title: '新闻66666',
            content: 'asdfasdf',
          },
        }"
      >
        新闻1
      </RouterLink> -->
      <!-- params传参 -->
      <!-- <RouterLink to="/news/1/1/新闻2/qowuieoiu">param路径传参</RouterLink> -->
      <!-- params传参 -->
      <RouterLink
        :to="{
          name: 'xinwen1',
          params: {
            id: 1,
            title: '新闻1',
            content: 'qowiueoiqu66',
          },
        }"
      >
        param对象传参
      </RouterLink>
      <li><RouterLink to="/news/2">新闻2</RouterLink></li>
    </ul>
    <!-- 展示区 -->
    <div class="news-content">
      <RouterView></RouterView>
    </div>
  </div>
</template>
<script setup lang="ts"></script>
<style scoped>
/* 新闻 */
.news {
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  height: 100%;
}
.news ul {
  margin-top: 30px;
  list-style: none;
  padding-left: 10px;
}
.news li > a {
  font-size: 18px;
  line-height: 40px;
  text-decoration: none;
  color: #64967e;
  text-shadow: 0 0 1px rgb(0, 84, 0);
}
.news-content {
  width: 90%;
  height: 90%;
  border: 1px solid;
  margin-top: 20px;
  border-radius: 10px;
}
</style>
